﻿<Window x:Class="Barbarian.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:barbarian="clr-namespace:Barbarian"
    Title="COBOL the Barbarian" Height="600" Width="800" FontFamily="Microsoft San Serif" SizeChanged="Window_SizeChanged">
    <Window.InputBindings>
        <KeyBinding Command="barbarian:Commands.CompileAndRun" Key="F5"/>
        <KeyBinding Command="barbarian:Commands.CompileAndRun" Key="G" Modifiers="Alt"/>
        <KeyBinding Command="barbarian:Commands.Export" Key="E" Modifiers="Control" />
        <KeyBinding Command="barbarian:Commands.RemoveAnnotations" Key="D0" Modifiers="Control" />
    </Window.InputBindings>
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.New" Executed="FileNew" />
        <CommandBinding Command="ApplicationCommands.Open" Executed="FileOpen" />
        <CommandBinding Command="ApplicationCommands.Save" Executed="FileSave" />
        <CommandBinding Command="ApplicationCommands.SaveAs" Executed="FileSaveAs" />
        <CommandBinding Command="barbarian:Commands.CompileAndRun" Executed="CompileAndRun" />
        <CommandBinding Command="barbarian:Commands.Export" Executed="Export" />
        <CommandBinding Command="barbarian:Commands.RemoveAnnotations" Executed="RemoveAnnotations" />
        <CommandBinding Command="barbarian:Commands.About" Executed="About" />
        <CommandBinding Command="barbarian:Commands.IssueTracker" Executed="IssueTracker" />
        <CommandBinding Command="barbarian:Commands.LearnCOBOL" Executed="LearnCOBOL" />
    </Window.CommandBindings>
    <DockPanel>
        <Menu BorderThickness="1" DockPanel.Dock="Top" FontFamily="Microsoft San Serif">
            <MenuItem Header="_File">
                <MenuItem Header="_New" Command="ApplicationCommands.New" />
                <MenuItem Header="_Open" Command="ApplicationCommands.Open" />
                <MenuItem Header="_Save" Command="ApplicationCommands.Save" />
                <MenuItem Header="Save _As" Command="ApplicationCommands.SaveAs" />
                <MenuItem Header="_Export" Command="barbarian:Commands.Export" InputGestureText="Ctrl+E" />
                <MenuItem Header="_Compile and Run" Command="barbarian:Commands.CompileAndRun" InputGestureText="F5"/>
                <MenuItem Header="_Remove Annotations" Command="barbarian:Commands.RemoveAnnotations" InputGestureText="Ctrl+0" />
            </MenuItem>
            <MenuItem Header="_Options" Name="OptionsMenu" />
            <MenuItem Header="_Help" Name="HelpMenu">
                <MenuItem Header="_About" Command="barbarian:Commands.About" />
                <MenuItem Header="Report a _Bug" Command="barbarian:Commands.IssueTracker" />
                <MenuItem Header="Request a _Feature" Command="barbarian:Commands.IssueTracker" />
            </MenuItem>
        </Menu>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="60*"/>
                <RowDefinition Height="40*"/>
            </Grid.RowDefinitions>
            <DockPanel Name="mainDockPanel" Grid.Row="0" LastChildFill="False">
                <DockPanel Name="codeDockPanel" DockPanel.Dock="Left">
                    <ToolBarPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" DockPanel.Dock="Top">
                        <ComboBox Margin="8,8,4,8" Height="23" Name="languageComboBox" Width="70" GotFocus="languageComboBox_GotFocus" SelectionChanged="languageComboBox_SelectionChanged">
<!--
                            <ComboBoxItem Content="C" IsSelected="True" />
                            <ComboBoxItem Content="C++" />
                            <ComboBoxItem Content="C++/CLI: mixed" />
-->
                            <ComboBoxItem Content="C#" IsSelected="True" />
                            <ComboBoxItem Content="C++/CLI: pure" />
                            <ComboBoxItem Content="VB" />
                        </ComboBox>
                        <Button Name="goButton1" Margin="0,8,8,8" Command="barbarian:Commands.CompileAndRun" IsEnabled="False">_Go!</Button>
                    </ToolBarPanel>
                    <GroupBox Header="Code" Margin="8,0,8,8" >
                        <TextBox AcceptsReturn="True" Name="codeBox" BorderThickness="0" FontFamily="Courier New" AcceptsTab="True" GotFocus="codeBox_GotFocus" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" />
                    </GroupBox>
                </DockPanel>
                <DockPanel Name="codeDockPanel2" DockPanel.Dock="Right">
                    <ToolBarPanel Name="toolBarPanel2" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" DockPanel.Dock="Top">
                        <ComboBox Margin="0,8,4,8" Height="23" Name="languageComboBox2" Width="70" GotFocus="languageComboBox2_GotFocus" SelectionChanged="languageComboBox2_SelectionChanged">
                            <ComboBoxItem Content="" />
                            <!--
                            <ComboBoxItem Content="C" IsSelected="True" />
                            <ComboBoxItem Content="C++" />
                            <ComboBoxItem Content="C++/CLI: mixed" />
-->
                            <ComboBoxItem Content="C#" />
                            <ComboBoxItem Content="C++/CLI: pure" />
                            <ComboBoxItem Content="VB" IsSelected="True" />
                        </ComboBox>
                        <Button Name="goButton2" Margin="0,8,8,8" Command="barbarian:Commands.CompileAndRun">_Go!</Button>
                    </ToolBarPanel>
                    <GroupBox Name="codeGroupBox2" Header="Code" Margin="0,0,8,8" >
                        <TextBox AcceptsReturn="True" Name="codeBox2" BorderThickness="0" FontFamily="Courier New" AcceptsTab="True" GotFocus="codeBox2_GotFocus" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" />
                    </GroupBox>
                </DockPanel>
            </DockPanel>
            <GroupBox Grid.Row="1" Header="Output" Margin="8,8,8,8">
                <FlowDocumentScrollViewer>
                    <FlowDocument>
                        <Paragraph Name="outputParagraph" FontFamily="Courier New" FontSize="11" />
                    </FlowDocument>
                </FlowDocumentScrollViewer>
            </GroupBox>
            <GridSplitter Background="#FF808080" Grid.Row="1" HorizontalAlignment="Stretch"
              VerticalAlignment="Top" ResizeDirection="Rows" Height="3" ShowsPreview="True"/>
        </Grid>
    </DockPanel>
</Window>
